<template>
  <d2-container>
    <div style="display:flex;flex-direction: column;margin:0 auto;width:80%">
      <div style="display:flex;align-items: center">
        <span>店铺名称：</span>
        <el-select v-model.trim="cooperation_id" clearable filterable placeholder="请选择店铺名称">
          <el-option
            v-for="item in shoplist"
            :key="item.id"
            :label="item.shopname"
            :value="item.shopname">
          </el-option>
        </el-select>
      </div>
      <br/>
      <div style="display:flex;align-items: center">
        <span>订单编号：</span>
        <el-input type="text" style="width:80%" v-model.trim="order_ali" placeholder="请输入订单编号"></el-input>
      </div>
      <br/>
      <div style="display:flex;align-items: center">
        <span>充值金额：</span>
        <el-input type="text" style="width:80%" v-model.trim="ail_money" placeholder="请输入充值金额"></el-input>
      </div>
      <br/>
      <div style="display:flex;align-items: center">
        <span>备注信息：</span>　　
        <el-input type="text" style="width:80%" v-model.trim="ail_note" placeholder="请输入备注"></el-input>
      </div>
      <br/>
      <div style="display:flex;align-items: center;margin-left:10px;">
       <el-button type="primary" @click="aliExamines()">充值</el-button>
      </div>
    </div>
  </d2-container>
</template>

<script>
import {aliExamine, cooperationshoplist} from "@/api/sys.login";
  export default {
    name: "index",
    data() {
      return {
        tableData:[],
        shoplist:[],
        cooperation_id:"",
        order_ali:"",
        ail_money:"",
        ail_note:"",
        options: [{
          value: '1',
          label: '银行卡充值'
        }, {
          value: '2',
          label: '支付宝充值'
        }],
        page:1,
      }
    },
    methods:{
      aliExamines(){
        aliExamine(this.cooperation_id,this.order_ali,Number(this.ail_money),this.ail_note).then((res)=>{
          console.log(res);
        })
      },
      cooperationshoplists(){
        cooperationshoplist({
          page:1,
          pageSize:1000
        }).then((res)=>{
          this.shoplist = res.data
          console.log(this.shoplist);
        })
      }
    },
    created() {
        this.cooperationshoplists()
    }
  }
</script>

<style>

</style>
